package models

// Article represents the structure of the article data.
type Article struct {
	TitleCn            *string   `json:"titleCn,omitempty"`
	SummaryCn          *string   `json:"summeryCn,omitempty"`
	SubtitleCn         *string   `json:"subtitleCn,omitempty"`
	ImgOssUrl          string    `json:"imgOssUrl"`
	PdfOssJson         string    `json:"pdfOssJson"`
	ArticleContentJson string    `json:"articleContentJson"`
	IsRelateChina      bool      `json:"isRelateChina"`
	Title              string    `json:"title"`
	ArticleTitleImg    string    `json:"articleTitleImg"`
	PublishDate        string    `json:"publishDate"`
	PublishTime        string    `json:"publishTime"`
	Summary            string    `json:"summary"`
	ArticleTypeCode    string    `json:"articleTypeCode"`
	ArticleFieldCode   []string  `json:"articleFieldCode"`
	Subtitle           string    `json:"subtitle"`
	Authors            []Author  `json:"authors"`
	Subpages           []string  `json:"subpages,omitempty"`
	ArticleUrl         string    `json:"articleUrl"`
	WebsiteCode        string    `json:"websiteCode"`
	ArticleCode        string    `json:"articleCode"`
	PdfDict            []PdfDict `json:"pdfDict,omitempty"`
	ArticleText        *string   `json:"articleText,omitempty"`
	ArticleRaw         *string   `json:"articleRaw,omitempty"`
	ArticleHtml        *string   `json:"articleHtml,omitempty"`
	Downloads          []string  `json:"downloads,omitempty"`
}

// ArticleContent represents the structure of the article content data.
type ArticleContent struct {
	ArticleCode string `json:"articleCode"`
	TextCn      string `json:"textCn"`
	Text        string `json:"text"`
	HTML        string `json:"html"`
	HTMLPro     string `json:"html_pro"`
	ArticleUrl  string `json:"articleUrl"`
	Apart1      string
	ImgOssUrl   string `json:"imgOssUrl"`
	Apart2      string
	Pdfs        []PdfOssJson `json:"pdfs""`
}

//// PdfOssJsonList represents a collection of PdfOssJson instances.
//type PdfOssJsonList struct {
//	Pdfs []PdfOssJson `json:"pdfs"`
//}

// PdfOssJson represents the structure of the PDF OSS JSON data.
type PdfOssJson struct {
	PdfCnUrl string `json:"cnUrl,omitempty"`
	PdfName  string `json:"name"`
	PdfUrl   string `json:"url"`
}

// Author represents the structure of the author data.
type Author struct {
	Name string `json:"name"`
	Link string `json:"link,omitempty"`
}

// PdfDict represents the structure of the PDF dictionary data.
type PdfDict struct {
	CnUrl *string `json:"cnUrl,omitempty"`
	Name  string  `json:"name"`
	Url   string  `json:"url"`
}

//在线文档

type ZKFieldMapping struct {
	QingyanFieldCode   string
	MappingFieldCode   string
	MappingWebsiteCode string
}
type ZKTypeMapping struct {
	ID                 string
	TypeNameCN         string
	TypeName           string
	TypeCode           string
	QingyanTypeCode    string
	MappingWebsiteCode string
}

// RequestBody 请求code结构体
type RequestBody struct {
	List []string `json:"list" binding:"required"`
}
